package com.jcubic.mvc.test.controller;

import com.jcubic.mvc.test.service.IndexService;
import org.jcubic.mvc.annotation.Controller;
import org.jcubic.mvc.annotation.Request;

import javax.annotation.Resource;


@Controller
public class IndexController {

    @Resource
    IndexService indexService;


    @Request("index")
    public String index() {
        indexService.index();
        return "index"; //jsp/index.jsp

    }

    @Request("list")
    public String list() {
        System.out.println("list");
        return "list";

    }

    @Request("detail/{id}")
    public String detail(Integer id) {
        System.out.println("detail");
        return "detail"; //jsp/index.jsp
    }




}
